export default function(client, io) {
  // 加入 常驻房间
  client.on('resident-room', function(data, cb) {
    const { roomId, userId } = data;
    // 加入房间
    client.join(roomId);
    console.log('常驻房间: => ', roomId, userId);

    if(data.userId === userId) {
      cb('ffffffffffffffff----');
    }
  });

  // 加入 临时房间
  client.on('resident-room', function(data, cb) {
    const { roomId, userId } = data;
    // 加入房间
    client.join(roomId);
    console.log('临时房间: => ', roomId);

    if(data.userId === userId) {
      cb('ffffffffffffffff----');
    }
  });
}
